package com.example.xss.controller;

import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.example.xss.beans.AddDto;
import com.xss.filters.annotation.XxsFilter;
import com.xss.filters.http.wrappers.CaptureRequestWrapper;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author wuxinxin
 */
@RestController
@RequestMapping("/xss")
public class XssController {

    /**
     * @see com.xss.filters.http.wrappers.CaptureRequestWrapper
     * @param request
     * @return
     * @throws IOException
     */
    @RequestMapping("/add")
    public void add(HttpServletRequest httpServletRequest,@RequestBody AddDto addDto) throws IOException {
        //JSONObject parameters = getParameters(httpServletRequest);
        System.out.println("执行add");
    }

}
